// 获取全部有数据的子表的数据

export default function() {
    const {
        addPageTemplate: {
            areaCodeList,
            busiSet
        },
        cardTable: {
            getAllRows
        }
    } = this.props;

    let allTableData = {};

    let allTableKey = [...new Set(areaCodeList.concat(busiSet))];

    allTableKey.forEach((item) => {
        let tableData = getAllRows(item);
        if(tableData.length > 0) {
            allTableData[item] = {
                areacode: item,
                rows: tableData
            }
        }
    });

    return allTableData;
}
